<?php
namespace app\admin\controller;

use app\BaseController;
use app\common\business\mysql\YwOtherConfig as serviceModel;
use app\common\business\mysql\CommonAdmin;

class YwOtherConfig extends BaseController
{

    /*
     * 所有数组
     */
    public function load(){
        $data = [
            'model' => serviceModel::getOne()
        ];
        jsonSuccess($data);
    }

    /*
     * 修改和编辑
     */
    public function edit(){
        $fildes = "id,service_phone,token";
        $receiveData = getData($this->request->post(),$fildes);
        $admin = CommonAdmin::checkToken(['token'=>$receiveData['token']]);
        serviceModel::edit($receiveData,$admin);
        jsonSuccess();
    }

}
